number_speaker object
This method will speak a number from -999999999 to 999999999.
int speak(double the_number)
Parameters:
the_number
The number to speak.
Return value:
0 on success, -1 on failure.
Remarks:
The speak method will look for sounds in accordance with the values stored in the prepend and append properties, and ascertain the best sound files to load by performing a number of searches based on the number at hand.
This function will return immediately when called, allowing the script to do other things while the number is being spoken. It is therefore necessary to call the speak_next method continuously to ensure that the numbers are spoken as smoothly and fluently as possible.
Example:
// Speak a number using speak and speak_next.
#include "number_speaker.bgt"
void main()
{
number_speaker test;
test.prepend="numbers/";
test.speak(1056);
while(test.speak_next()==1)
{
wait(5);
}
}